﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;

namespace MyPSDALayer
{
    [MetadataType(typeof(UserMetaData))]
    public partial class User
    {
        private class UserMetaData
        {
            [Required(ErrorMessage = "用户ID不能为空")]
            [Display(Name = "用户ID")]
            public string UserID { get; set; }
            [Required(ErrorMessage = "名不能为空")]
            [Display(Name = "名")]
            public string FirstName { get; set; }
            [Required(ErrorMessage = "姓不能为空")]
            [Display(Name = "姓")]
            public string LastName { get; set; }
            [Required(ErrorMessage = "密码不能为空")]
            [Display(Name = "密码")]
            [DataType(DataType.Password)]
            public string Password { get; set; }
            [Display(Name = "邮箱")]
            [DataType(DataType.EmailAddress)]
            public string Mail { get; set; }
            [Display(Name = "手机号码")]
            public string Mobile { get; set; }
            [Display(Name = "地址")]
            public string Address { get; set; }
        }
    }
}
